<?php

## just a file to test everything

require_once('class.tg_php_gallery.php');

## show menu

echo '<a href="' . $_SERVER["PHP_SELF"] . '?view=admin">Admin-View</a><br />';

$galleryArray = Gallery::getAllGalleries();
foreach ($galleryArray as $gallery) {
	echo '<a href="' . $_SERVER["PHP_SELF"] . '?view=list&gallery=' . urlencode($gallery) . '">' . $gallery . '</a><br />';
}

$gallery = new tg_php_gallery('testGal');

$gallery->displayHeader('Testpage');

switch ($_GET['view']) {
	case 'admin':
		$gallery->showAdminView();
	break;
	case 'list':
		$gallery->showListView(urldecode($_GET['gallery']));
	break;
	case 'single':
		$gallery->showSingleView(urldecode($_GET['gallery']), urldecode($_GET['image']));
	break;
}
$gallery->displayFooter();
?>